<include file="public@header"/>
<style>
td,th{
	text-align:center;
}

html { overflow-x:hidden; }
</style>
</head>
<body>
<div class="wrap js-check-wrap">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<table class="table table-bordered">
				<thead>
					<tr><th>班级名称</th><td>{$timetable_data['class_name']}</td></tr>
					<tr><th>任课老师</th><td>{$timetable_data['teacher_name']}</td></tr>
					<tr><th>教室</th><td>{$timetable_data['classroom_name']}</td></tr>
					<tr><th>课次</th><td><div class="btn-group">
							<button class="btn btn-default btn-sm">第{$timetable_data['times']}次课</button> <button data-toggle="dropdown" class="btn btn-default btn-sm dropdown-toggle"><span class="caret"></span></button>
						<ul class="dropdown-menu">
							<foreach name="times_data" item="times_vo">
								<li><a href="{:url('admin/class/class_attendance',['timetable_id'=>$times_vo['id']])}">第{$times_vo['times']}次课</a></li>
							</foreach>
						</ul>
						</div>&nbsp&nbsp&nbsp&nbsp共{$timetable_data['class_number']}次课</td></tr>
					<tr><th>上课时间</th><td>{:date('Y年m月d日 H:i:s',$timetable_data['start_time'])}-{:date('H:i:s',$timetable_data['end_time'])}</td></tr>
				</thead>
			</table>
			<table class="table table-striped">
				<thead>
					<tr>
						<th style="width:10%;">序号</th>
						<th>姓名</th>
						<th>联系电话</th>
						<th><a class="btn btn-primary js-ajax-dialog-btn" href="{:url('admin/class/onekey_attendance',['timetable_id'=>$timetable_data['id']])}">一键签到</a></th>
					</tr>
				</thead>
				<tbody>
				<foreach name="student_data" item="vo" key="key">
					<tr>
						<td>{$key+1}</td>
						<td>{$vo.name}</td>
						<td><a href="tel:{$vo.phone}">{$vo.phone}</a></br><a href="tel:{$vo.phone2}">{$vo.phone2}</a></td>
						<td><div class="btn-group">
							<button class="btn btn-default btn-sm">{$vo.attendance_status}</button> <button data-toggle="dropdown" class="btn btn-default btn-sm dropdown-toggle"><span class="caret"></span></button>
						<ul class="dropdown-menu">
							<li><a class="js-ajax-dialog-btn" href="{:url('admin/student/attendance',['code'=>'1','student_id'=>$vo['student_id'],'timetable_id'=>$vo['timetable_id']])}">正常签到</a></li>
							<li><a class="js-ajax-dialog-btn" href="{:url('admin/student/attendance',['code'=>'-1','student_id'=>$vo['student_id'],'timetable_id'=>$vo['timetable_id']])}">迟到</a></li>
							<li><a class="js-ajax-dialog-btn" href="{:url('admin/student/attendance',['code'=>'-2','student_id'=>$vo['student_id'],'timetable_id'=>$vo['timetable_id']])}">早退</a></li>
							<li><a class="js-ajax-dialog-btn" href="{:url('admin/student/attendance',['code'=>'-3','student_id'=>$vo['student_id'],'timetable_id'=>$vo['timetable_id']])}">缺席</a></li>
							<li class="divider"></li>
							<li><a class="js-ajax-dialog-btn" href="{:url('admin/student/attendance',['code'=>'3','student_id'=>$vo['student_id'],'timetable_id'=>$vo['timetable_id']])}">请假</a></li>
							<li class="divider"></li>
							<li><a class="js-ajax-dialog-btn" href="{:url('admin/student/attendance',['code'=>'0','student_id'=>$vo['student_id'],'timetable_id'=>$vo['timetable_id']])}">未考勤</a></li>
						</ul>
						</div></td>
					</tr>
				</foreach>
				</tbody>
			</table>
		</div>
	</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>